package com.example.roadeyeserver.controller;

import com.example.roadeyeserver.entity.report.BusTrunkFlowReport;
import com.example.roadeyeserver.entity.report.CityProvinceReport;
import com.example.roadeyeserver.entity.request.CityProvinceStatisticRequest;
import com.example.roadeyeserver.result.Result;
import com.example.roadeyeserver.service.OdCustomDayFlowService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("odCustomDayFlow")
public class OdCustomDayFlowController {

    @Resource
    private OdCustomDayFlowService odCustomDayFlowService;

    @PostMapping("getBusTrunkFlowReport")
    public Result<List<BusTrunkFlowReport>> getBusTrunkFlowReport(@RequestBody CityProvinceStatisticRequest request) {
        return odCustomDayFlowService.getBusTrunkFlowReport(request);
    }

    @PostMapping("getCityProvinceReport")
    public Result<List<CityProvinceReport>> getCityProvinceReport(@RequestBody CityProvinceStatisticRequest request) {
        return odCustomDayFlowService.getCityProvinceReport(request);
    }

    @PostMapping("getBusTrunkFlowRank")
    public Result<List<BusTrunkFlowReport>> getBusTrunkFlowRank(@RequestBody CityProvinceStatisticRequest request) {
        return odCustomDayFlowService.getBusTrunkFlowRank(request);
    }

    @PostMapping("getCountyReport")
    public Result<List<BusTrunkFlowReport>> getCountyReport(@RequestBody CityProvinceStatisticRequest request) {
        return odCustomDayFlowService.getCountyReport(request);
    }

}
